package com.kata.chapter2;

/**
 * Created by Solidsnake on 2014/11/16.
 */
public class Main {

    public static void main(String[] args) {
        FactoryMethod benZFactory = new BenZFactory();
        FactoryMethod bmwFactory = new BMWFactory();

        Car car = benZFactory.getCar();
        car.printName();
        car.driving();

        System.out.println("=================");

        car = bmwFactory.getCar();
        car.printName();
        car.driving();
    }
}
